<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>[page_title]</title>
        <meta name="description" content="[meta_description]" />
        <meta name="keywords" content="[meta_keyword]" />
        <link rel="stylesheet" type="text/css" href="<?php echo $config ['client_css_url'];?>/reset.css" />
        <link rel="stylesheet" type="text/css" href="<?php echo $config ['client_css_url'];?>/layout.css" />
        <link rel="stylesheet" type="text/css" href="<?php echo $config ['client_css_url'];?>/csshorizontalmenu.css" />
        <script type="text/javascript" src="<?php echo $config ['client_js_url'];?>/csshorizontalmenu.js"></script>
        <script type="text/javascript" src="<?php echo $config ['client_js_url'];?>/jquery.min.js"></script>
    </head>

    <body>
        <script type="text/javascript" src="<?php echo $config ['client_js_url'];?>/common.js"></script>
        <div id="mainWrapper">
            <!-- BEGIN HEADER -->
            <div id="header" class="clearfix">
                <h1 id="logo"><a href="<?php echo $config['domain'];?>"><img src="<?php echo $config ['client_images_url'];?>/logo.gif" alt="Bantinnhadat.vn Thông tin nhà đất cập nhật 24/7" /></a></h1>
                <div class="header_right">
                    <div class="datetime"><script type="text/javascript">document.write(dateText);</script> (GMT+7)</div>
                    <ul id="topnav">
                        <li><a href="#" onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('<?php echo $config['domain'];?>');">Đặt làm trang chủ</a></li>
                        <li class="last"><a href="/rss">RSS <img src="<?php echo $config ['client_images_url'];?>/ico_rss14.gif" alt="RSS" /></a></li>
                    </ul>
                </div>
            </div>
            <!-- END HEADER -->

            <!-- BEGIN HEADER BAR-->
            <div id="header_bar">
                <div class="header_bar_inside clearfix">
                    <ul id="mainnav" class="clearfix">
                        <li><a id="menu_home" href="/">Trang chủ</a></li>
                        <?php
                        $menu = getCategoryByParentId();
                        while($rs=$DB->fetch_array($menu)) {
                            ?>
                        <li>
                            <a id="menu_<?php echo $rs['link'];?>" href="/cata/<?php echo $rs['link'];?>"><?php echo $rs['name'];?></a>
                                <?php
                                $menuChild = getCategoryByParentId($rs['id']);
                                if($menuChild) {
                                    ?>
                            <ul>
                                        <?php
                                        $i=0;
                                        while($rsChild=$DB->fetch_array($menuChild)) {
                                            $i++;
                                            if($i==$DB->num_rows($menuChild)) {
                                                ?>
                                <li class="last"><a href="/cata/<?php echo $rsChild['link'];?>"><?php echo $rsChild['name'];?></a></li>
                                            <?php
                                            }else {
                                                ?>
                                <li><a href="/cata/<?php echo $rsChild['link'];?>"><?php echo $rsChild['name'];?></a></li>
                                            <?php
                                            }
                                        }
                                        $rsChild='';
                                        ?>
                            </ul>
                                <?php
                                }
                                ?>
                        </li>
                        <?php
                        }
                        ?>

                    </ul>
                    <script type="text/javascript">
                        function search(){
                            if($("#keyword").val()==''){
                                $("#keyword").val('')
                                $("#keyword").focus();
                                return false;
                            }else{
                                window.location = "<?php echo $config['domain'];?>/search/" + $("#keyword").val();
                            }
                        }
                    </script>
                    <div class="box_search">
                        <form action="" method="get" onsubmit="search(); return false;">
                            <input id="keyword" name="keyword" type="text" class="input_search" value="<?php if(isset($config['keyword'])){echo $config['keyword'];}else{echo "Tìm kiếm BĐS";}?>" onkeydown="if (event.keyCode == 13){search();return false;}" onclick="if(this.value=='Tìm kiếm BĐS'){this.value=''}" onblur="if(this.value=='' || this.value==' '){this.value='Tìm kiếm BĐS'}"/>
                            <input type="submit" value="Search" class="btn_search"/>
                        </form>
                    </div>
                </div>
            </div>
            <!-- END HEADER BAR -->